package cn.edu.scujcc;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/touristspots")
public class TouristSpotsController {
	@Autowired
	private TouristSpotsService service;
	
	@GetMapping
	public List<TouristSpots> getAllComments(){
		List<TouristSpots> result = null;
		result = service.getAllComments();
		return result;
	}
	
	@GetMapping("/images")
	public List<TouristSpots> getImages(){
		List<TouristSpots> result = null;
		result = service.getImages();
		return result;
	}
	
	@GetMapping("/intro/{id}")
	public TouristSpots getIntroduction(@PathVariable String id){
		TouristSpots result = null;
		result = service.getIntroduction(id);
		return result;
	}
}
